<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="../img/base.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../img/jquery.js" ></script>
<script language="javascript">
    function checkSubmit()
    {
      if(document.form1.admin_name.value == '')
      {
	       alert("请填写用户名称！");
	       return false;
      }  
      
      if( $("#password2").val() != $("#password").val())
      {
	    alert('两次密码不一样！');
	    return false;
      }
      else if( $("#password2").val().length > 0)
      {	   
	     if(  $("#password2").val().length < 6)
	    {
		   alert('请输入大于六位数的密码！');
		   return false;
	    }
      }
      
    }   
</script>
</head>
<body leftmargin='15' topmargin='10' bgcolor="#FFFFFF">
   <form name="form1" action="admin_act.php?action=edit" enctype="multipart/form-data" method="post" onSubmit="return checkSubmit()">
    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
	    <td>&nbsp;</td>
	</tr>
    </table>

    <table width="97%" border="0" align="center" cellpadding="0" cellspacing="0" id="head1" style="border-bottom:1px solid #CCCCCC">
	<tr>
	    <td colspan="2">
		<table width="98%" border="0" cellpadding="0" cellspacing="0">
		    <tr>
			<td width="84" height="24" align="center" background="../img/itemnote1.gif">&nbsp;编辑用户&nbsp;</td>
			<td width="84"></td>
			<td>&nbsp;</td>
		    </tr>
		</table>
	    </td>
	</tr>
    </table>
    <table width="98%"  border="0" align="center" cellpadding="2" cellspacing="2" id="needset">
	<tr>
	    <td height="24" colspan="4" class="bline">
		<table width="98%" border="0" cellspacing="0" cellpadding="0">
		    <tr>
			<td class="bline" width="90">&nbsp;用户名称：</td>
			<td class="bline"><input name="admin_id" type="hidden" value="<{$admin_index_info.admin_id}>"/><input name="admin_name" type="text" value="<{$admin_index_info.admin_name}>" id="admin_name" size="30" class="iptxt" /><span style="color:#F00">*必填</span></td>
		    </tr>
		</table>      
	    </td>
	</tr>
	<tr>	    
	    <td height="24" colspan="4" class="bline">
		    <table width="98%" border="0" cellspacing="0" cellpadding="0">
			 <tr>
				    <td class="bline" width="90">&nbsp;真实姓名：</td>
				    <td class="bline"><input name="real_name" type="text" value="<{$admin_index_info.real_name}>" id="real_name" size="30" class="iptxt" /></td>
			    </tr>
		    </table>      
	    </td>
	</tr>
	<tr>	    
	    <td height="24" colspan="4" class="bline">
		    <table width="98%" border="0" cellspacing="0" cellpadding="0">
			 <tr>
				    <td class="bline" width="90">&nbsp;权 限 组：</td>
				    <td class="bline">
					<select name="group_id">
					    <{foreach from=$admin_group_result item=group_list}>
					       <option value="<{$group_list.group_id}>" <{if $admin_index_info.group_id == $group_list.group_id}>selected="selected"<{/if}>><{$group_list.group_name}></option>
					    <{/foreach}>
					</select>
				    </td>
			    </tr>
		    </table>      
	    </td>
	</tr>		    
	<tr>
	    <td height="24" colspan="4" class="bline">
		    <table width="98%" border="0" cellspacing="0" cellpadding="0">
			    <tr>
				    <td class="bline" width="90">&nbsp;负责地区：</td>
				    <td class="bline">
					<select name="district">
					    <{foreach from=$district_list item=district}>
					    <option <{if $district.id == $admin_index_info.district}>selected="selected"<{/if}> value="<{$district.id}>"><{$district.name}></option>
					    <{/foreach}>
					</select>
				    </td>
			    </tr>
		    </table>      
	    </td>
	 </tr>			
     
	<tr class="admin_index_edit_password">	    
	    <td height="24" colspan="4" class="bline">
		    <table width="98%" border="0" cellspacing="0" cellpadding="0">
			<tr>
			    <td class="bline" width="90">&nbsp;新 密 码：</td>
			    <td class="bline"><input name="password" type="password"  id="password" size="30" value="" class="iptxt" /></td>
		        </tr>
		    </table>      
	    </td>
	</tr>
	<tr class="admin_index_edit_password">	    
	    <td height="24" colspan="4" class="bline">
		    <table width="98%" border="0" cellspacing="0" cellpadding="0">
			<tr>
			    <td class="bline" width="90">&nbsp;确认密码：</td>
			    <td class="bline"><input name="password2" type="password" id="password2" size="30" value="" class="iptxt" /></td>
		        </tr>
		    </table>      
	    </td>
	</tr>	
	
    </table>

    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
	    <td height="56">
		<table width="98%" border="0" cellspacing="1" cellpadding="1">
		    <tr>
			<td align="center">
			    <table width="214" border="0" cellspacing="0" cellpadding="0" >
				<tr>
				    <td width="115">
					<input name="imageField" type="image" src="../img/button_ok.gif" width="60" height="22" class="np" border="0"  style="cursor:pointer; ">
				    </td>
				    <td width="99">
					 <img src="../img/button_reset.gif" width="60" height="22" border="0" onClick="location.reload();" style="cursor:pointer; ">
				    </td>
				</tr>
			   </table>
			</td>
		    </tr>
		</table>
	    </td>
	</tr>
    </table>
    </form>
</body>

</html>